package com.maidou.qiantai.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.maidou.qiantai.mapper.OsRefundInfoMapper;
import com.maidou.qiantai.domain.OsRefundInfo;
import com.maidou.qiantai.service.IOsRefundInfoService;

/**
 * 退款信息Service业务层处理
 * 
 * @author maidou
 * @date 2024-03-15
 */
@Service
public class OsRefundInfoServiceImpl implements IOsRefundInfoService 
{
    @Autowired
    private OsRefundInfoMapper osRefundInfoMapper;

    /**
     * 查询退款信息
     * 
     * @param id 退款信息主键
     * @return 退款信息
     */
    @Override
    public OsRefundInfo selectOsRefundInfoById(Long id)
    {
        return osRefundInfoMapper.selectOsRefundInfoById(id);
    }

    /**
     * 查询退款信息列表
     * 
     * @param osRefundInfo 退款信息
     * @return 退款信息
     */
    @Override
    public List<OsRefundInfo> selectOsRefundInfoList(OsRefundInfo osRefundInfo)
    {
        return osRefundInfoMapper.selectOsRefundInfoList(osRefundInfo);
    }

    /**
     * 新增退款信息
     * 
     * @param osRefundInfo 退款信息
     * @return 结果
     */
    @Override
    public int insertOsRefundInfo(OsRefundInfo osRefundInfo)
    {
        osRefundInfo.setCreateTime(DateUtils.getNowDate());
        return osRefundInfoMapper.insertOsRefundInfo(osRefundInfo);
    }

    /**
     * 修改退款信息
     * 
     * @param osRefundInfo 退款信息
     * @return 结果
     */
    @Override
    public int updateOsRefundInfo(OsRefundInfo osRefundInfo)
    {
        osRefundInfo.setUpdateTime(DateUtils.getNowDate());
        return osRefundInfoMapper.updateOsRefundInfo(osRefundInfo);
    }

    /**
     * 批量删除退款信息
     * 
     * @param ids 需要删除的退款信息主键
     * @return 结果
     */
    @Override
    public int deleteOsRefundInfoByIds(Long[] ids)
    {
        return osRefundInfoMapper.deleteOsRefundInfoByIds(ids);
    }

    /**
     * 删除退款信息信息
     * 
     * @param id 退款信息主键
     * @return 结果
     */
    @Override
    public int deleteOsRefundInfoById(Long id)
    {
        return osRefundInfoMapper.deleteOsRefundInfoById(id);
    }
}
